package cn.highedu.spring.bean17;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.sql.DataSource;

public class JdbcAccountRepository implements AccountRepository {
    private DataSource dataSource;

    public JdbcAccountRepository(){
    }

    public JdbcAccountRepository(DataSource dataSource){
        this.dataSource = dataSource;
    }

    @Override
    public DataSource getDataSource() {
        return dataSource;
    }

    public void init(){
        System.out.println("init" + getClass());
    }
}
